//
//  TwentyFourMode.m
//  项目二
//
//  Created by rimi on 16/5/26.
//  Copyright © 2016年 objective. All rights reserved.
//

#import "TwentyFourMode.h"

@implementation TwentyFourMode
- (void)loadImageWithUrlStr:(NSString *)urlStr {
    dispatch_async(dispatch_get_global_queue(0, 0), ^{
        NSURL *url = [NSURL URLWithString:urlStr];
        NSData *data = [NSData dataWithContentsOfURL:url];
        UIImage *image = [UIImage imageWithData:data];
        self.image1 = image;
    });
}

- (void)setImage:(UIImage *)image {
    _image1 = image;
    [[NSNotificationCenter defaultCenter] postNotificationName:@"hasImage" object:self];
}
@end
